package me.boot.common.data.model;

import cn.hutool.core.util.StrUtil;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import me.base.commom.model.pojo.BasePOJO;

/**
 * @Description:
 * @author: Sylar
 * @date: 2021年11月12日 1:45 下午
 */
@Getter
@Setter
@ApiModel("地址")
public class Address extends BasePOJO {

    @ApiModelProperty(value = "邮编")
    private String postcode;

    @ApiModelProperty(value = "国家")
    private String country;

    @ApiModelProperty(value = "省")
    private String province;

    @ApiModelProperty(value = "市")
    private String city;

    @ApiModelProperty(value = "县/区")
    private String area;

    @ApiModelProperty(value = "街道详细地址")
    private String street;

    @JsonIgnore
    public String getFull() {
        return StrUtil.format("{}{}{}{}{}", country, province, city, area, street);
    }
}
